import processing.opengl.*;

int frame = 0;

Electronsphere es;

void setup(){
  background(50,50,50);
  size(400,400,P3D);
  //initialize global
  global = new Global();
  global.init();
  //initialize electron sphere
  es = new Electronsphere();
}

void draw(){
  render();
}

void render(){
  frame++;
  background(50,50,50);
  pushMatrix();
  translate(width/2,height/2,0);
  stroke(255);
  fill(255,50);
  es.rotate((mouseY-height/2)*.00007,-(mouseX-width/2)*.00007);
  es.step();
  es.render();
  popMatrix();
}

float randomize(float $n,float $r){
  return $n+random(-$r/2,$r/2);
}
